﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Web/FarmMaster.master" AutoEventWireup="true" CodeFile="Teachers.aspx.cs" Inherits="Web_Teachers" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
   <script language="javascript" type="text/javascript">
       //说明 所有的元素以ul li ul li ul li的循环格式嵌套 如果没有下级分类 就用li a结束嵌套
       $(document).ready(function () {
           //$(".navvan ul li").children("ul").hide();
           $(".navvan").find("li").not(":has(ul)").children("a").css({ textDecoration: "none", color: "#333", background: "none" }).click(function () {
		                                 
		                              });
           $(".navvan").find("li:has(ul)").children("a").css({ background: "url(images/statu_close.gif) no-repeat left top;" }).click(function () {
	                                                        if ($(this).next("ul").is(":hidden")) {
	                                                            $(this).next("ul").slideDown("slow");
	                                                            if ($(this).parent("li").siblings("li").children("ul").is(":visible")) {
	                                                                $(this).parent("li").siblings("li").find("ul").slideUp("1000");
	                                                                $(this).parent("li").siblings("li:has(ul)").children("a").css({ background: "url(images/statu_close.gif) no-repeat left top;" }).end().find("li:has(ul)").children("a").css({ background: "url(images/statu_close.gif) no-repeat left top;" });
	                                                            }
	                                                            $(this).css({ background: "url(images/statu_open.gif) no-repeat left top;" });
	                                                            return false;
	                                                        } else {
	                                                            $(this).next("ul").slideUp("normal");
	                                                            //不用toggle()的原因是为了在收缩菜单的时候同时也将该菜单的下级菜单以后的所有元素都隐藏
	                                                            $(this).css({ background: "url(images/statu_close.gif) no-repeat left top;" });
	                                                            $(this).next("ul").children("li").find("ul").fadeOut("normal");
	                                                            $(this).next("ul").find("li:has(ul)").children("a").css({ background: "url(images/statu_close.gif) no-repeat left top;" });
	                                                            return false;
	                                                        }

	                                                    });
       });
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div id="main">
		<div class="left">
			<div class="navvan">
	        <div class="part">师资队伍</div>
	        <asp:Repeater ID="Layer1" runat="server" onitemdatabound="Layer1_ItemDataBound">
                <ItemTemplate>
                    <ul class="outside">
		                <li class="first">
			                <a href="#"><asp:Label ID="V1" runat="server" Text='<%#Eval("Name") %>'></asp:Label></a>

                            <ul class="child">
                                <asp:Repeater ID="Layer2" runat="server" onitemdatabound="Layer2_ItemDataBound">
                                    <ItemTemplate>
				                        <li class="second">
					                        <a href="#"><asp:Label ID="V2" runat="server" Text='<%#Eval("Name") %>'></asp:Label></a>
                                            
                                            <ul class="child">
                                                <asp:Repeater ID="Layer3" runat="server">
                                                    <ItemTemplate>
                                                            <li class="third">
                                                                <a href="#"><%#Eval("Name") %></a>
                                                                <ul class="fourth">
                                                                    <li><a href='Teachers.aspx?did=<%=Request.Params["did"]%>&rank=市外专家&course=<%#Eval("Name") %>'>市外专家</a></li>
                                                                    <li><a href='Teachers.aspx?did=<%=Request.Params["did"]%>&rank=市级专家&course=<%#Eval("Name") %>'>市级专家</a></li>
                                                                    <li><a href='Teachers.aspx?did=<%=Request.Params["did"]%>&rank=县级专家&course=<%#Eval("Name") %>'>县级专家</a></li>
                                                                </ul>
                                                            </li>
                                                    </ItemTemplate>
                                                </asp:Repeater>
                                            </ul>
                                        </li>
                                    </ItemTemplate>
                                </asp:Repeater>
                            </ul>
                        </li>
                    </ul>
                </ItemTemplate>
            </asp:Repeater>
        </div>
			<div class="left2" style="padding-top:13px;">
				<div class="tle">
					<span class="text1">培训通知</span>
				</div>
				<div class="tents">
					<ul style=" padding-top:5px;">
                        <asp:Repeater ID="Repeater1" runat="server">
                            <ItemTemplate>
                                <li><%#string.Format("<a href='ViewTrain.aspx?pid={0}'>{1}</a>",Eval("ID"), Convert.ToString(Eval("Memo")).Length>12?Convert.ToString(Eval("Memo")).Substring(0, 11)+"...": Eval("Memo"))%></li>
                            </ItemTemplate>
                        </asp:Repeater>
					</ul>
				</div>

			</div>
			<div class="left2">
				<div class="tle">
					<span class="text1">最新动态</span>
				</div>
				<div class="tents">
					<ul style=" padding-top:5px;">
						<asp:Repeater ID="Repeater3" runat="server">
                            <ItemTemplate>
                                <li><a href='<%=Toolkit.ApplicationRoot %>/Html/<%#Eval("url") %>'><%#Eval("Title").ToString().Length>12?Eval("Title").ToString().Substring(0,11)+"...":Eval("Title") %></a></li>
                            </ItemTemplate>
                        </asp:Repeater>
					</ul>
				</div>
			</div>
		</div>
		<div class="right">
			<div class="headline">
				您的当前位置：<%=path %>
			</div>
			<div class="content" style=" border:none;">
                <asp:DataList ID="DataList1" runat="server" RepeatColumns="2">
                     <ItemTemplate>
                        <div class="present">
		                    <span class="img">
			                    <a href='TeacherDetail.aspx?teacher_id=<%#Eval("id") %>'><img src='<%#Eval("photo") %>' alt=""/></a>
		                    </span>
		                    <div class="right">
			                    <div><strong>姓　名</strong>：<%#Eval("name") %></div>
			                    <div><strong>电子邮件</strong>：<%#Eval("email") %></div>
			                    <div class="path"><strong>授课方向</strong>：<%#Eval("courses").ToString().Substring(0, Eval("courses").ToString().IndexOf("|")).Length > 25 ? Eval("courses").ToString().Substring(0, 24) + "..." : Eval("courses").ToString().Substring(0, Eval("courses").ToString().IndexOf("|"))%><br>
                                    其他课程：<%#Eval("courses").ToString().EndsWith("|") ? "无" : Eval("courses").ToString().Substring(Eval("courses").ToString().IndexOf('|') + 1).Length > 13 ? Eval("courses").ToString().Substring(Eval("courses").ToString().IndexOf('|') + 1).Substring(0,12)+"..." : Eval("courses").ToString().Substring(Eval("courses").ToString().IndexOf('|') + 1)%></div>
			                    <div class="information"><strong>简　介</strong>:<%#Eval("memo").ToString().Length > 40 ? Eval("memo").ToString().Substring(0, 38) + "..." : Eval("memo")%></div>
		                    </div>
	                    </div>
                    </ItemTemplate>
                </asp:DataList>
			</div>
            <div class="cup">
	            <ul>
		            <li class="cup1">
                        <asp:ImageButton ID="FirstButton" runat="server" 
                            SkinID="FirstButton" onclick="ChangePage" /></li>
		            <li class="cup2">
                        <asp:ImageButton ID="PreviousButton" runat="server" 
                            SkinID="PreviousButton" onclick="ChangePage" /></li>
		            <li class="cup5">第<%=pds.PageCount==0?0: pds.CurrentPageIndex+1 %>页/共<%=pds.PageCount %>页</li>
		            <li class="cup3">
                        <asp:ImageButton ID="NextButton" runat="server" 
                            SkinID="NextButton" onclick="ChangePage" /></li>
		            <li class="cup4">
                        <asp:ImageButton ID="LastButton" runat="server" 
                            SkinID="LastButton" onclick="ChangePage" /></li>
	            </ul>
            </div>
		</div>
	</div>
</asp:Content>



